<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改会员资料')" />
    <th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-profile-edit" th:object="${memberProfile}">
            <input name="id" th:field="*{id}" type="hidden">
            <input name="memberId" th:field="*{memberId}" type="hidden">
            <div class="form-group" id="type">

            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">手机号：</label>
                <div class="col-sm-8">
                    <input name="phone" th:field="*{phone}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group" >
                <label class="col-sm-3 control-label is-required">usdt地址：</label>
                <div class="col-sm-8">
                    <textarea name="usdtAddress" class="form-control" required>[[*{usdtAddress}]]</textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开户银行：</label>
                <div class="col-sm-8">
                    <input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">银行卡号：</label>
                <div class="col-sm-8">
                    <input name="bankCard" th:field="*{bankCard}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">开户名称：</label>
                <div class="col-sm-8">
                    <input name="accountName" th:field="*{accountName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">支付宝收款码：</label>
                <div class="col-sm-8">
                    <input type="hidden" name="alipayPaymentCode" th:field="*{alipayPaymentCode}">
                    <img th:src="*{alipayPaymentCode}">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">微信收款码：</label>
                <div class="col-sm-8">
                    <img th:src="*{wechatPaymentCode}">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-12 col-sm-offset-3">
<!--                    <button type="submit" class="btn btn-primary">确认付款</button>-->
                    <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js"/>
    <script th:inline="javascript">
        var prefix = ctx + "member/profile";
        var typeDatas = [[${@dict.getType('sys_withdraw_state')}]];
        let selectDictLabel = $.table.selectDictLabel(typeDatas, [[${type}]]);
        console.log(selectDictLabel)
        $('#type').innerHTML = selectDictLabel;

        $(".file-upload").each(function (i) {
            var val = $("input[name='" + this.id + "']").val()
            $(this).fileinput({
                initialPreviewAsData: true,
                initialPreview: [val],
                maxFileCount: 1,
                autoReplace: true
            }).on('fileuploaded', function (event, data, previewId, index) {
                $("input[name='" + event.currentTarget.id + "']").val(data.response.url)
            }).on('fileremoved', function (event, id, index) {
                $("input[name='" + event.currentTarget.id + "']").val('')
            })
            $(this).fileinput('_initFileActions');
        });
        function confirmPayment(id,type) {

        }
    </script>
</body>
</html>